package com.sc.nft.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum PrizeDrawActivityTypeEnum {

    PARTITION_ACTIVITY(1,"瓜分活动"),
    GUESSING_ACTIVITY(2,"竞猜活动"),
    CONTINUITY_SIGN_IN_ACTIVITY(3,"连续签到"),
    CUMULATIVE_SIGN_IN_ACTIVITY(4,"累计签到"),

    ;
    @EnumValue
    private int code;
    private String description;

    public static PrizeDrawActivityTypeEnum getByCode(int code) {
        for (PrizeDrawActivityTypeEnum value : values()) {
            if(value.getCode() == code){
                return value;
            }
        }
        return null;
    }
}
